
#include <iostream>
#include <fstream>
#include <ctime>

using namespace std;

int main()
{
    int c;
    c = 0;
    int ** a;
    a = new int*[5000];
    int bubble(f):
    {
        while !EOF
        {
            a.append(int(i));
        }
        st = clock ();
        for (i = 0; i <=sizeof(f)-2;i++)
        {
            for (y = i+1;y<=sizeof(a)-1;i++)
            {
                if a[y]>a[y+1]
                {
                    c = a[y];
                    a[y]=a[y+1];
                    a[y+1]=c;
                }
            }
        }
        end=clock();
        return end-st;
    }
    f1 = fopen("m1_sorted.txt");
    f2 = fopen("m2_reverse.txt");
    f3 = fopen("m3_shuffle.txt");
    cout<<"m1_sorted"<<round(bubble(f1))<<"milliseconds";
    cout<<"m2_reverse"<<round(bubble(f2))<<"milliseconds";
    cout<<"m3_shuffle" <<round(bubble(f3))<< "milliseconds";
}
